-- BP 7.1.6 content: Package syschar: 3 persistence-version: 7.1.6

INSERT INTO EP_PKG
	VALUES ("6af001f7-bb54-4ef1-9f8b-8c3db6765396",
	"00000000-0000-0000-0000-000000000000",
	"c8b88000-dddc-4206-8410-2f69b8f86b67",
	'Object Model Bridges',
	'Incoming bridges for creating model elements of the Object Model subsystem as 
metamodel instances.
',
	0);
INSERT INTO GD_MD
	VALUES ("8417370b-a279-469e-82cc-af3d4838ec67",
	112,
	"6af001f7-bb54-4ef1-9f8b-8c3db6765396",
	108,
	0,
	0,
	1,
	1,
	1,
	12,
	1,
	0,
	0,
	0,
	0,
	0,
	'',
	'shlaer-mellor-metamodel::metamodel::Shlaer-Mellor Metamodel::Incoming Bridges::Object Model Bridges');
INSERT INTO DIM_DIA
	VALUES ("8417370b-a279-469e-82cc-af3d4838ec67",
	'',
	1.000000,
	0.000000,
	0.000000,
	"00000000-0000-0000-0000-000000000000");
INSERT INTO S_SYNC
	VALUES ("17315416-12d6-4284-90ac-85d709c049e4",
	"00000000-0000-0000-0000-000000000000",
	'changeAttributeToDerived',
	'Add the relationship path from a non-referential attribute to the attribute it 
is derived from.
    Process modeling of the derivation is added in another bridge.',
	'result = creationResult_t::SUCCESS;
select any domain from instances of MDOM where selected.name == param.domain;
if (empty domain)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
else
  select any subtd from instances of SUB where selected.name == param.object_to_derive;
  if (empty subtd)
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"Object, " + param.object_to_derive + ", not instantiated!" );
  else
    select any subdf from instances of SUB where selected.name == param.object_derived_from;
    if (empty subdf)
      result = creationResult_t::FAILURE;
      LOG::LogFailure( message:"Object, " + param.object_derived_from + ", not instantiated!" );
    else
      select any atd from instances of ATR where (selected.name == param.attribute_to_derive) and selected.belongsTo( object: subtd.name );
      if (empty atd)
        result = creationResult_t::FAILURE;
        LOG::LogFailure( message:"Attribute, " + param.attribute_to_derive + " not instantiated!." );
      else
        select any adf from instances of ATR where (selected.name == param.attribute_derived_from) and selected.belongsTo( object: subdf.name );
        if (empty adf)
          result = creationResult_t::FAILURE;
          LOG::LogFailure( message:"Attribute, " + param.attribute_derived_from + " not instantiated!." );
        else
          create object instance der of DER;
          select one nrad related by atd->NRA[R103];
          relate adf to nrad across R127 using der;
          create object instance ae of AE;
          create object instance ata of ATA;
          relate ae to ata across R509;
          relate ata to der across R522;
          create object instance acc of ACC;
          create object instance sya of SYA;
          relate acc to sya across R505;
          create object instance isy of ISY;
          relate isy to sya across R524;
          relate isy to ata across R534;
          create object instance rvl of RVL;
          select one type related by nrad->TYPE[R123];
          relate type to sya across R529 using rvl;
          create object instance atype of TYPE;
          create object instance core of CORE;
          relate atype to core across R401;
        end if;
      end if;
    end if;
  end if;
end if;
return result;',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("a12c3ad3-4e98-4fb6-8579-36830ecd2ce4",
	"17315416-12d6-4284-90ac-85d709c049e4",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.');
INSERT INTO S_SPARM
	VALUES ("ff0a2a41-0318-41a3-941f-3f1728e2d3dd",
	"17315416-12d6-4284-90ac-85d709c049e4",
	'attribute_to_derive',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"a12c3ad3-4e98-4fb6-8579-36830ecd2ce4",
	'The name of the attribute that is derived.');
INSERT INTO S_SPARM
	VALUES ("5ab4dda9-b8e9-49d5-98a3-8f43cb01cedc",
	"17315416-12d6-4284-90ac-85d709c049e4",
	'attribute_derived_from',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"c1b3438d-304b-4596-bd86-fbe681ce4dfd",
	'The name of the attribute that is the source of the derivation.
');
INSERT INTO S_SPARM
	VALUES ("c1b3438d-304b-4596-bd86-fbe681ce4dfd",
	"17315416-12d6-4284-90ac-85d709c049e4",
	'object_to_derive',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"ff0a2a41-0318-41a3-941f-3f1728e2d3dd",
	'The name of the Shlaer-Mellor object that the attribute to derive specializes.');
INSERT INTO S_SPARM
	VALUES ("12a34f28-b017-4d51-881c-d93c89e7c904",
	"17315416-12d6-4284-90ac-85d709c049e4",
	'object_derived_from',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"5ab4dda9-b8e9-49d5-98a3-8f43cb01cedc",
	'The name of the Shlaer-Mellor object that the attribute derived from 
specializes.');
INSERT INTO PE_PE
	VALUES ("17315416-12d6-4284-90ac-85d709c049e4",
	1,
	"6af001f7-bb54-4ef1-9f8b-8c3db6765396",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_DT_PROXY
	VALUES ("709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	"00000000-0000-0000-0000-000000000000",
	'creationResult_t',
	'The creation result type is used in conjunction with creating a Shlaer-Mellor 
domain model to verify it is compatible with the metamodel. The result 
enumerator directs the verifier toward further action.',
	'',
	'../../../DataTypes/DataTypes.xtuml');
INSERT INTO S_SYNC
	VALUES ("09f244cc-9d6d-4896-a105-f8f5be8b6d9e",
	"00000000-0000-0000-0000-000000000000",
	'createAttribute',
	'Create an attribute for a given object with type and identification qualifiers.

It should be noted, that attribute derivations are created in a separate step.',
	'result = creationResult_t::SUCCESS;
if ("" == param.name)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Create attribute failed due to invalid attribute name, " + param.name + "." );
else
  select any domain from instances of MDOM where selected.name == param.domain;
  if (empty domain)
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
  else
    select any sub from instances of SUB where selected.name == param.object;
    if (empty sub)
      result = creationResult_t::FAILURE;
      LOG::LogFailure( message:"Object, " + param.object + ", not instantiated!" );
    else
      select any type from instances of TYPE where selected.name == param.type;
      if (empty type)
        result = creationResult_t::FAILURE;
        LOG::LogFailure( message:"Data type, " + param.type + ", not instantiated!" );
      else
        select any oa from instances of OA where selected.object_name == param.object;
        select any spa from instances of SPA where selected.subtype_name == param.object;
        if (not empty oa or not empty spa)
          result = creationResult_t::DUPLICATE;
          LOG::LogFailure( message:"Attribute already instantiated!" );
        else
          create object instance attribute of ATR;
          create object instance nra of NRA;
          relate nra to attribute across R103;
          relate nra to type across R123;
          if (0 != param.identifier)
            create object instance idp of IDP;
            create object instance id of ID;
            relate id to attribute across R102 using idp;
            idp.groupId = param.identifier;
          end if;
          select any obj from instances of OBJ where selected.name == sub.name;
          if (empty obj)
            // This is a specializing attribute.
            create object instance spa of SPA;
            relate spa to attribute across R124;
            select one prp related by sub->PRP[R107];
            relate spa to prp across R130;
            select many sbts related by prp->SBT[R122];
            for each sbt in sbts
              select any sbs related by sbt->OBS[R126]->SBS[R125];
              if (not empty sbs)
                select one obs related by sbs->OBS[R125];
                unrelate sbs from obs across R125;
                relate obs to sbs across R125;
              else
                create object instance obs of OBS;
                relate spa to obs across R125;
                relate obs to sbt across R126;
              end if;
            end for;
          else
            create object instance oa of OA;
            relate oa to obj across R129;
            relate oa to attribute across R124;
          end if;
        end if;
      end if;
    end if;
  end if;
end if;
',
	"ba5eda7a-def5-0000-0000-000000000000",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("48bb5c76-4f70-4a60-9066-f6e3730fd319",
	"09f244cc-9d6d-4896-a105-f8f5be8b6d9e",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.
');
INSERT INTO S_SPARM
	VALUES ("54373f23-5082-45e9-9676-1c71e50a577d",
	"09f244cc-9d6d-4896-a105-f8f5be8b6d9e",
	'object',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"48bb5c76-4f70-4a60-9066-f6e3730fd319",
	'The name of the Shlaer-Mellor object that this attribute specializes.');
INSERT INTO S_SPARM
	VALUES ("8dd75ced-a905-4b89-bc91-e2c107e9c8bc",
	"09f244cc-9d6d-4896-a105-f8f5be8b6d9e",
	'name',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"54373f23-5082-45e9-9676-1c71e50a577d",
	'The name of the attribute.');
INSERT INTO S_SPARM
	VALUES ("4b4f4c72-7e6a-44d8-993f-f2125e5a6581",
	"09f244cc-9d6d-4896-a105-f8f5be8b6d9e",
	'type',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"8dd75ced-a905-4b89-bc91-e2c107e9c8bc",
	'The name of the data type defining this attribute.');
INSERT INTO S_SPARM
	VALUES ("2cac1bef-0cc4-4146-b7af-d7e02c72bee3",
	"09f244cc-9d6d-4896-a105-f8f5be8b6d9e",
	'identifier',
	"ba5eda7a-def5-0000-0000-000000000002",
	0,
	'',
	"4b4f4c72-7e6a-44d8-993f-f2125e5a6581",
	'This is the identifier participation number for the attribute. A zero indicates 
the attribute doesn''t participate in any identifiers.');
INSERT INTO PE_PE
	VALUES ("09f244cc-9d6d-4896-a105-f8f5be8b6d9e",
	1,
	"6af001f7-bb54-4ef1-9f8b-8c3db6765396",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_SYNC
	VALUES ("69dda828-fd03-4f8e-8981-18ef31c6db2c",
	"00000000-0000-0000-0000-000000000000",
	'createBinaryRelationship',
	'Create a binary relationship between two specified object instances, or create 
a temporary binary relationship between one or two specified objects for the 
purpose of statically verifying an object model.
    A binary relationship between the same object must specify the object in 
both the passiveObject and activeObject parameters.
    The temporary instances are created by setting both instance parameters to 
zero. Only setting one to zero is an error.
    The active/passive terminology used is reflective of how verb phrases are 
often used in relationships with one using an active perspective and one using 
a passive perspective. It is a differentiator in the metamodel, but not a hard 
rule for Shlaer-Mellor modeling. If the perspective is unclear or the same in 
both directions, then just arbitrarily assign the parameters.
    Referential cheatsheet:
    (All are reflexive)
    1:1 - choose either side
    1:1c - 1c
    1:M  - M
    1:Mc - Mc
    1c:1c - use associative object
    1c:M  - use associative object
    1c:Mc - use associative object
    M:M   - use associative object
    Mc:M  - use associative object
    Mc:Mc - use associative object
',
	'result = creationResult_t::SUCCESS;
select any domain from instances of MDOM where selected.name == param.domain;
if (empty domain)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
elif (("" == param.activePhrase) or ("" == param.passivePhrase))
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"This metamodel requires verb phrases at both ends of the binary relationship!" );
else
  select any associative from instances of SUB where selected.name == param.associativeObject;
  if (empty associative and 
      ((param.activeMany and param.passiveMany) or (param.activeConditional and param.passiveConditional) or 
       (param.activeMany and param.passiveConditional) or (param.activeConditional and param.passiveMany)))
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"This metamodel enforces use of associative objects for all M:M, M:c, c:M, and c:c relationships!" );
  else
    select any irl from instances of IRL where selected.number == param.number;
    if (not empty irl)
      result = creationResult_t::DUPLICATE;
      LOG::LogFailure( message:"Duplication of relationship number!" );
    else
      select any actSub from instances of SUB where selected.name == param.activeObject;
      if (empty actSub)
        result = creationResult_t::FAILURE;
        LOG::LogFailure( message:"Active object, " + param.activeObject + ", not instantiated!" );
      else
        select any passSub from instances of SUB where selected.name == param.passiveObject;
        if (empty passSub)
          result = creationResult_t::FAILURE;
          LOG::LogFailure( message:"Passive object, " + param.passiveObject + ", not instantiated!" );
        else
          // Create relationship
          create object instance rel of REL;
          create object instance irl of IRL;
          relate actSub to passSub across R133.''is related to'' using irl;
          relate irl to rel across R200;
          create object instance ncm of NCM;
          relate ncm to irl across R213;
          create object instance bin of BIN;
          relate irl to bin across R201;
          // Add perspectives
          create object instance apsp of PSP;
          apsp.phrase = param.activePhrase;
          apsp.conditional = param.activeConditional;
          if (param.activeMany)
            create object instance amnyp of MNYP;
            relate amnyp to apsp across R210;
          else
            create object instance aonep of ONEP;
            relate aonep to apsp across R210;
          end if;
          create object instance aasp of ASP;
          relate aasp to apsp across R204;
          create object instance aacp of ACP;
          relate aacp to aasp across R205;
          relate aacp to bin across R207;
          create object instance ppsp of PSP;
          ppsp.phrase = param.passivePhrase;
          ppsp.conditional = param.passiveConditional;
          // Add multiplicity
          if (param.passiveMany)
            create object instance pmnyp of MNYP;
            relate pmnyp to ppsp across R210;
          else
            create object instance ponep of ONEP;
            relate ponep to ppsp across R210;
          end if;
          create object instance pasp of ASP;
          relate pasp to ppsp across R204;
          create object instance pacp of ACP;
          relate pacp to pasp across R205;
          relate pacp to bin across R207;
          // Determine referential location
          idSub = passSub;
          if (not empty associative)
            idSub = associative;
          elif (param.passiveConditional or param.passiveMany)
            idSub = actSub;
          end if;
          // Find identifiers and create referentials
          idSub.associateReferentials( relationship:irl.number );
          if (not empty associative)
            create object instance rel of REL;
            create object instance arl of ARL;
            relate arl to rel across R200;
            relate arl to irl across R212;
            relate idSub to arl across R202;
          end if;
        end if;
      end if;
    end if;
  end if;
end if;
return result;
',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("52cd69eb-602e-491c-8e0c-ae73dc03d7a0",
	"69dda828-fd03-4f8e-8981-18ef31c6db2c",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.
');
INSERT INTO S_SPARM
	VALUES ("b1b6fd3a-8da4-4e1c-8100-c9e8b16bebdc",
	"69dda828-fd03-4f8e-8981-18ef31c6db2c",
	'number',
	"ba5eda7a-def5-0000-0000-000000000002",
	0,
	'',
	"52cd69eb-602e-491c-8e0c-ae73dc03d7a0",
	'The numeric identifier for the relationship.');
INSERT INTO S_SPARM
	VALUES ("41d815df-3af0-4ec7-b96d-fc20ea878149",
	"69dda828-fd03-4f8e-8981-18ef31c6db2c",
	'passiveObject',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"b1b6fd3a-8da4-4e1c-8100-c9e8b16bebdc",
	'The passive object is the one at the end of the relationship with the passive 
verb phrase.');
INSERT INTO S_SPARM
	VALUES ("f4ce6dac-64b7-45d7-b9e4-94f47a766141",
	"69dda828-fd03-4f8e-8981-18ef31c6db2c",
	'activeObject',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"41d815df-3af0-4ec7-b96d-fc20ea878149",
	'The active object is the one on the end of the relationship with the active 
verb phrase.');
INSERT INTO S_SPARM
	VALUES ("fa3061dc-3278-4bff-a875-4181b71cb199",
	"69dda828-fd03-4f8e-8981-18ef31c6db2c",
	'passivePhrase',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"f4ce6dac-64b7-45d7-b9e4-94f47a766141",
	'A passive verb phrase is one that has action taken on it. e.g., "is configured 
by"');
INSERT INTO S_SPARM
	VALUES ("eeea7079-cf0c-475d-9a96-2b12bb29579b",
	"69dda828-fd03-4f8e-8981-18ef31c6db2c",
	'activePhrase',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"fa3061dc-3278-4bff-a875-4181b71cb199",
	'An active verb phrase is one that takes action. e.g., "configures" 

');
INSERT INTO S_SPARM
	VALUES ("dde7ceb1-2cbd-4f82-bc53-d8ec824fba52",
	"69dda828-fd03-4f8e-8981-18ef31c6db2c",
	'activeConditional',
	"ba5eda7a-def5-0000-0000-000000000001",
	0,
	'',
	"eeea7079-cf0c-475d-9a96-2b12bb29579b",
	'A true value indicates that a conditional indicator is placed at the end of the 
relationship with the active verb phrase.');
INSERT INTO S_SPARM
	VALUES ("047c688d-0395-4861-b7b1-b666cea0701d",
	"69dda828-fd03-4f8e-8981-18ef31c6db2c",
	'passiveConditional',
	"ba5eda7a-def5-0000-0000-000000000001",
	0,
	'',
	"dde7ceb1-2cbd-4f82-bc53-d8ec824fba52",
	'A true value indicates that a conditional indicator is placed at the end of the 
relationship with the passive verb phrase.');
INSERT INTO S_SPARM
	VALUES ("0b432abe-61e4-4a49-b2e9-8fad8f0edb1b",
	"69dda828-fd03-4f8e-8981-18ef31c6db2c",
	'activeMany',
	"ba5eda7a-def5-0000-0000-000000000001",
	0,
	'',
	"047c688d-0395-4861-b7b1-b666cea0701d",
	'A true value indicates that a many indicator is placed at the end of the 
relationship with the active verb phrase.');
INSERT INTO S_SPARM
	VALUES ("97fc549b-2a5e-47bd-8ebd-34f51f7a9438",
	"69dda828-fd03-4f8e-8981-18ef31c6db2c",
	'passiveMany',
	"ba5eda7a-def5-0000-0000-000000000001",
	0,
	'',
	"0b432abe-61e4-4a49-b2e9-8fad8f0edb1b",
	'A true value indicates that a many indicator is placed at the end of the 
relationship with the passive verb phrase.
');
INSERT INTO S_SPARM
	VALUES ("617b32be-f000-4211-b707-28bd81a7286f",
	"69dda828-fd03-4f8e-8981-18ef31c6db2c",
	'associativeObject',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"97fc549b-2a5e-47bd-8ebd-34f51f7a9438",
	'The name of the associative object to abstract the binary relationship. If left 
blank, there is no associative object abstracting the relationship. 
    If an associative object is required, then this must name an already 
created object.');
INSERT INTO PE_PE
	VALUES ("69dda828-fd03-4f8e-8981-18ef31c6db2c",
	1,
	"6af001f7-bb54-4ef1-9f8b-8c3db6765396",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_SYNC
	VALUES ("31f70bc3-6925-47ea-b168-525b9c6ea279",
	"00000000-0000-0000-0000-000000000000",
	'createIntersectingSubtype',
	'Create a Shlaer-Mellor intersecting subtype object of the specified supertype 
objects using the specified relationships in the specified domain.
    The subtype and supertypes specify the intersection of two sets (objects).
    The intersecting subtype might have already be created, and this call is 
just specifying another set participating in the intersection, or the subtype 
might already exist as a non-intersecting subtype; this call is then 
transforming the non-intersecting subtype into an intersecting subtype.
',
	'result = creationResult_t::SUCCESS;
if ("" == param.name)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Create subtype failed due to invalid subtype name, " + param.name + ".");
else
  select any domain from instances of MDOM where selected.name == param.domain;
  if (empty domain)
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
  else
    select any supersub1 from instances of SUB where selected.name == param.superset1;
    if (empty supersub1)
      result = creationResult_t::FAILURE;
      LOG::LogFailure( message:"Supertype object, " + param.superset1 + ", not instantiated!" );
    else
      select any supersub2 from instances of SUB where selected.name == param.superset2;
      if (empty supersub2)
        result = creationResult_t::FAILURE;
        LOG::LogFailure( message:"Supertype object, " + param.superset2 + ", not instantiated!" );
      else
        // Each supersub must belong to a separate set. Intersecting subsets 
        // always belong to different sets, otherwise they are actually a 
        // multiway subtyping.
        select any obj from instances of OBJ where selected.hasSubtype( subtype:supersub1.name ) and selected.hasSubtype( subtype:supersub2.name );
        if (not empty obj)
            result = creationResult_t::FAILURE;
            LOG::LogFailure( message:"Supertypes belong to the same object!" );
        else
          // We could be transforming an existing NSB to an ISB, adding an 
          // existing ISB to another supertype, or creating a new subtype.
          select any sub from instances of SUB where (selected.name == param.name) or (selected.keyletters == param.keyletters);
          if (empty sub)
            create object instance sub of SUB;
            sub.name = param.name;
            sub.keyletters = param.keyletters;
            create object instance prp of PRP;
            relate sub to prp across R107;
            create object instance isb of ISB;
            relate isb to prp across R108;
          else
            select any sup1 related by sub->PRP[R107]->ISB[R108]->ITS[R135]->OBS[R125] where selected.supertype_id == param.supertype1;
            select any sup2 related by sub->PRP[R107]->ISB[R108]->ITS[R135]->OBS[R125] where selected.supertype_id == param.supertype2;
            if (not_empty sup1 and not_empty sup2)
              result = creationResult_t::DUPLICATE;
              LOG::LogFailure( message: "Intersecting subtyping already exists!" );
            else
              // Transform to ISB
              select one nsb related by sub->PRP[R107]->NSB[R108];
              if (not empty nsb)
                select one prp related by sub->PRP[R107];
                unrelate nsb from prp across R108;
                delete object instance nsb;
                create object instance isb of ISB;
                relate isb to prp across R108;
              end if;
            end if;
          end if;
          select many objs from instances of OBJ where selected.hasSubtype( subtype:supersub1.name );
          for each obj1 in objs
            select one prp related by sub->PRP[R107];
            select one isb related by prp->ISB[R108];
            select any obj related by isb->OBJ[R135] where selected.name == obj1.name;
            if (empty obj)
              create object instance its of ITS;
              relate isb to obj1 across R135 using its;
              select any sbt related by prp->SBT[R122] where (selected.subtype_name == sub.name) and (selected.supertype_id == param.supertype1);
              if (not_empty sbt)
                select any sbs related by sbt->OBS[R126]->SBS[R125];
                if (not empty sbs)
                  select one obs related by sbs->OBS[R125];
                  unrelate sbs from obs across R125;
                  delete object instance sbs;
                  relate its to obs across R125;
                else
                  create object instance obs of OBS;
                  relate its to obs across R125;
                  relate obs to sbt across R126;
                end if;
              else
                select any sup1 from instances of SUP where selected.id == param.supertype1;
                if (empty sup1)
                  create object instance sup1 of SUP;
                end if;
                create object instance sbt of SBT;
                relate prp to sup1 across R122 using sbt;
                create object instance obs of OBS;
                relate its to obs across R125;
                relate obs to sbt across R126;
              end if;
            end if;
          end for;
          select many objs from instances of OBJ where selected.hasSubtype( subtype:supersub2.name );
          for each obj2 in objs
            select one prp related by sub->PRP[R107];
            select one isb related by prp->ISB[R108];
            select any obj related by isb->OBJ[R135] where selected.name == obj1.name;
            if (empty obj)
              create object instance its of ITS;
              relate isb to obj1 across R135 using its;
              select any sbt related by prp->SBT[R122] where (selected.subtype_name == sub.name) and (selected.supertype_id == param.supertype1);
              if (not_empty sbt)
                select any sbs related by sbt->OBS[R126]->SBS[R125];
                if (not empty sbs)
                  select one obs related by sbs->OBS[R125];
                  unrelate sbs from obs across R125;
                  delete object instance sbs;
                  relate its to obs across R125;
                else
                  create object instance obs of OBS;
                  relate its to obs across R125;
                  relate obs to sbt across R126;
                end if;
              else
                select any sup1 from instances of SUP where selected.id == param.supertype1;
                if (empty sup1)
                  create object instance sup1 of SUP;
                end if;
                create object instance sbt of SBT;
                relate prp to sup1 across R122 using sbt;
                create object instance obs of OBS;
                relate its to obs across R125;
                relate obs to sbt across R126;
              end if;
            end if;
          end for;
        end if;
      end if;
    end if;
  end if;
end if;
return result;
',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("ceafb9a1-8ad1-4589-a840-f9cb7381279e",
	"31f70bc3-6925-47ea-b168-525b9c6ea279",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.');
INSERT INTO S_SPARM
	VALUES ("4b12b2ee-7b12-45e4-b2ee-df45dda7b3a5",
	"31f70bc3-6925-47ea-b168-525b9c6ea279",
	'name',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"ceafb9a1-8ad1-4589-a840-f9cb7381279e",
	'The subtype name.');
INSERT INTO S_SPARM
	VALUES ("08630a06-2f52-4245-b24d-8d307a3cd132",
	"31f70bc3-6925-47ea-b168-525b9c6ea279",
	'keyletters',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"4b12b2ee-7b12-45e4-b2ee-df45dda7b3a5",
	'The subtype keyletters. If left blank, the keyletters are assumed the 
same as the name.');
INSERT INTO S_SPARM
	VALUES ("9fc507b0-a564-41af-b065-64e8230af93b",
	"31f70bc3-6925-47ea-b168-525b9c6ea279",
	'superset1',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"08630a06-2f52-4245-b24d-8d307a3cd132",
	'The name of the first supertype object that this subtype is specializing.
');
INSERT INTO S_SPARM
	VALUES ("d01aed64-1307-43b3-925e-d832044fd8dd",
	"31f70bc3-6925-47ea-b168-525b9c6ea279",
	'supertype1',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"9fc507b0-a564-41af-b065-64e8230af93b",
	'The identifier for the first supertype. (OAL uses relationship identifiers, 
e.g., R1.)');
INSERT INTO S_SPARM
	VALUES ("6cae0acc-d9d0-4cc3-bc81-6253347a9420",
	"31f70bc3-6925-47ea-b168-525b9c6ea279",
	'superset2',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"d01aed64-1307-43b3-925e-d832044fd8dd",
	'The name of the second supertype object that this subtype is specializing.
');
INSERT INTO S_SPARM
	VALUES ("0acb99e3-52c9-405d-be7b-bbcc7f6bbade",
	"31f70bc3-6925-47ea-b168-525b9c6ea279",
	'supertype2',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"6cae0acc-d9d0-4cc3-bc81-6253347a9420",
	'The identifier for the second supertype. (OAL uses relationship identifiers, 
e.g., R2.)
');
INSERT INTO PE_PE
	VALUES ("31f70bc3-6925-47ea-b168-525b9c6ea279",
	1,
	"6af001f7-bb54-4ef1-9f8b-8c3db6765396",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_SYNC
	VALUES ("24086f70-4500-4cd4-85f1-db35779a34ba",
	"00000000-0000-0000-0000-000000000000",
	'createMethod',
	'Add an object method to an existing object or subset.',
	'result = creationResult_t::SUCCESS;
if ("" == param.name)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Create method failed due to invalid method name, " + param.name + "." );
else
  select any domain from instances of MDOM where selected.name == param.domain;
  if (empty domain)
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
  else
    select any sub from instances of SUB where selected.name == param.object;
    if (empty sub)
      result = creationResult_t::FAILURE;
      LOG::LogFailure( message:"Object, " + param.object + ", not instantiated!" );
    else
      select any mth related by sub->PRP[R107]->SBT[R122]->OBS[R126]->SMT[R125]->IM[R533]->MTH[R532] where selected.name == param.name;
      if (empty mth)
        select any mth related by sub->OBJ[R107]->NM[R131]->IM[R533]->MTH[R532] where selected.name == param.name;
      elif (empty mth and not param.instanceBased)
        select any mth related by sub->OBJ[R107]->OM[R132]->MTH[R532] where selected.name == param.name;
      end if;
      if (not empty mth)
        result = creationResult_t::DUPLICATE;
        LOG::LogFailure( message:"Method, " + param.name + ", already instantiated!" );
      else
        select one obj related by sub->OBJ[R107];
        if (empty obj and not param.instanceBased)
          result = creationResult_t::FAILURE;
          LOG::LogFailure( message:"Object, " + param.object + ", is a subtype, but instance based isn''t specified!");
        else
          create object instance mth of MTH;
          create object instance ae of AE;
          relate mth to ae across R509;
          create object instance isy of ISY;
          relate isy to mth across R534;
          create object instance sya of SYA;
          relate sya to isy across R524;
          create object instance acc of ACC;
          acc.name = param.name;
          relate acc to sya across R505;
        if (param.instanceBased)
          create object instance im of IM;
          relate im to mth across R532;
            if (empty obj)
            create object instance smt of SMT;
            relate smt to im across R533;
            select one prp related by sub->PRP[R107];
              select many sbts related by prp->SBT[R122];
              for each sbt in sbts
                select any sbs related by sbt->OBS[R126]->SBS[R125];
                if (empty sbs)
                  create object instance obs of OBS;
                  relate smt to obs across R125;
                relate obs to sbt across R126;
            else
                  select one obs related by sbs->OBS[R125];
                  unrelate sbs from obs across R125;
                  relate smt to obs across R125;
            end if;
              end for;
          else
            create object instance nm of NM;
            relate nm to im across R533;
            relate nm to obj across R131;
          end if;
        else
            create object instance om of OM;
            relate om to mth across R532;
            relate om to obj across R132;
          end if;
        end if;
      end if;
    end if;
  end if;
end if;
return result;',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("4ef5db86-8587-4232-9eda-d986af8c053f",
	"24086f70-4500-4cd4-85f1-db35779a34ba",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.
');
INSERT INTO S_SPARM
	VALUES ("fe30c7c0-ec41-4d5b-b19d-e2b192e662ef",
	"24086f70-4500-4cd4-85f1-db35779a34ba",
	'object',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"4ef5db86-8587-4232-9eda-d986af8c053f",
	'The name of the object.');
INSERT INTO S_SPARM
	VALUES ("8641d218-e8a5-4cb5-be92-5a1f7ffd8e87",
	"24086f70-4500-4cd4-85f1-db35779a34ba",
	'instanceBased',
	"ba5eda7a-def5-0000-0000-000000000001",
	0,
	'',
	"e31e7fc6-33b0-4b00-8eff-514fbb757045",
	'');
INSERT INTO S_SPARM
	VALUES ("e31e7fc6-33b0-4b00-8eff-514fbb757045",
	"24086f70-4500-4cd4-85f1-db35779a34ba",
	'name',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"fe30c7c0-ec41-4d5b-b19d-e2b192e662ef",
	'The name of the method.
');
INSERT INTO PE_PE
	VALUES ("24086f70-4500-4cd4-85f1-db35779a34ba",
	1,
	"6af001f7-bb54-4ef1-9f8b-8c3db6765396",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_SYNC
	VALUES ("7e230ed5-2456-40b3-b34b-c93adfe3b194",
	"00000000-0000-0000-0000-000000000000",
	'createNonIntersectingSubtype',
	'Create a Shlaer-Mellor non-intersecting subtype object of the specified 
supertype object using the specified relationship in the specified domain.',
	'result = creationResult_t::SUCCESS;
if ("" == param.name)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Create subtype failed due to invalid subtype name, " + param.name + ".");
else
  select any domain from instances of MDOM where selected.name == param.domain;
  if (empty domain)
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
  else
    select any supersub from instances of SUB where selected.name == param.supertype;
    if (empty supersub)
      result = creationResult_t::FAILURE;
      LOG::LogFailure( message:"Supertype object, " + param.supertype + ", not instantiated!" );
    else
      select any sub from instances of SUB where (selected.name == param.name) or (selected.keyletters == param.keyletters);
      if (not empty sub)
        result = creationResult_t::DUPLICATE;
        LOG::LogFailure( message:"Duplication of subtype name, " + sub.name + ", or keyletters," + sub.keyletters + "!" );
      else
        create object instance sub of SUB;
        create object instance prp of PRP;
        relate sub to prp across R107;
        create object instance nsb of NSB;
        relate prp to nsb across R108;
        select any sup from instances of SUP where selected.id == param.relationship;
        if (empty sup)
          create object instance sup of SUP;
          // Determine if object or subtype partitioning
          select one obj related by supersub->OBJ[R107];
          if (not empty obj)
            create object instance chd of CHD;
            relate sup to obj across R134 using chd;
          else
            select one superprp related by supersub->PRP[R107];
            create object instance mlv of MLV;
            relate sup to superprp across R114 using mlv;
          end if;
        end if;
        relate sup to nsb across R136;
        create object instance sbt of SBT;
        relate prp to sup across R122 using sbt;
        create object instance obs of OBS;
        relate obs to sbt across R126;
        // All non-intersecting subtypes are initially created as a 
        // subsequent specialization. The subtype is migrated when any other 
        // type of specialization is added.
        create object instance sbs of SBS;
        relate sbs to obs across R125;
      end if;
    end if;
  end if;
end if;
return result;',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("fdd5b7bd-db21-4263-879e-e44858d050bc",
	"7e230ed5-2456-40b3-b34b-c93adfe3b194",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.');
INSERT INTO S_SPARM
	VALUES ("01497693-4eb2-4f5c-80f0-6fb75f255916",
	"7e230ed5-2456-40b3-b34b-c93adfe3b194",
	'supertype',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"d2752cd3-df09-45c5-9fd9-015fc9d083c1",
	'The name of the supertype that this subtype is specializing.
');
INSERT INTO S_SPARM
	VALUES ("7e37c78a-9a54-44f0-9987-c25cc845bf8f",
	"7e230ed5-2456-40b3-b34b-c93adfe3b194",
	'name',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"fdd5b7bd-db21-4263-879e-e44858d050bc",
	'The subtype name.');
INSERT INTO S_SPARM
	VALUES ("d2752cd3-df09-45c5-9fd9-015fc9d083c1",
	"7e230ed5-2456-40b3-b34b-c93adfe3b194",
	'keyletters',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"7e37c78a-9a54-44f0-9987-c25cc845bf8f",
	'The subtype keyletters. If left blank, the keyletters are assumed the 
same as the name.');
INSERT INTO S_SPARM
	VALUES ("1a382af2-a4a8-4b8f-902f-dbf3100a13d4",
	"7e230ed5-2456-40b3-b34b-c93adfe3b194",
	'relationship',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"01497693-4eb2-4f5c-80f0-6fb75f255916",
	'The name of the subtyping relationship.');
INSERT INTO PE_PE
	VALUES ("7e230ed5-2456-40b3-b34b-c93adfe3b194",
	1,
	"6af001f7-bb54-4ef1-9f8b-8c3db6765396",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_SYNC
	VALUES ("1eded5d6-115a-4607-844d-70d36a05aa05",
	"00000000-0000-0000-0000-000000000000",
	'createObject',
	'Create a Shlaer-Mellor object or root supertype object in the specified domain.',
	'result = creationResult_t::SUCCESS;
if ("" == param.name)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Create object failed due to invalid object name, " + param.name + "." );
else
  select any domain from instances of MDOM where selected.name == param.domain;
  if (empty domain)
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
  else
    select any obj from instances of OBJ where selected.name == param.name;
    if (not empty obj)
      result = creationResult_t::DUPLICATE;
      LOG::LogFailure( message:"Duplication of object name, " + obj.name + "!" );
    else
      create object instance obj of OBJ;
      relate obj to domain across R105;
        create object instance sub of SUB;
      sub.name = param.name;
        if ("" == param.keyletters)
          sub.keyletters = param.name;
        else
          sub.keyletters = param.keyletters;
        end if;
      LOG::LogInfo( message:"Object, " + param.name + ", created with no attributes." );
    end if;
  end if;
end if;
return result;
',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("56c7f22e-c9e5-41a6-bf3e-10a9b9ac9207",
	"1eded5d6-115a-4607-844d-70d36a05aa05",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.
');
INSERT INTO S_SPARM
	VALUES ("95d83a9b-4c14-487b-b1ca-76044cc8598f",
	"1eded5d6-115a-4607-844d-70d36a05aa05",
	'isSupertype',
	"ba5eda7a-def5-0000-0000-000000000001",
	0,
	'',
	"7e555f49-8d77-4f9e-be1e-95a5d32da722",
	'Indicates if the object is a Shlaer-Mellor root supertype object. For non-root 
supertype objects, i.e., supertype objects that are also subtype objects, one 
of the create subtype functions must be used.');
INSERT INTO S_SPARM
	VALUES ("803c67e9-d622-4933-a639-557869d3a1cf",
	"1eded5d6-115a-4607-844d-70d36a05aa05",
	'name',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"56c7f22e-c9e5-41a6-bf3e-10a9b9ac9207",
	'The name of the object.');
INSERT INTO S_SPARM
	VALUES ("7e555f49-8d77-4f9e-be1e-95a5d32da722",
	"1eded5d6-115a-4607-844d-70d36a05aa05",
	'keyletters',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"803c67e9-d622-4933-a639-557869d3a1cf",
	'The keyletters used as an short name for the object. If left blank, the object 
name will be used for the keyletters.');
INSERT INTO PE_PE
	VALUES ("1eded5d6-115a-4607-844d-70d36a05aa05",
	1,
	"6af001f7-bb54-4ef1-9f8b-8c3db6765396",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_SYNC
	VALUES ("a4860f18-8714-4b5a-b949-7dcab4de1735",
	"00000000-0000-0000-0000-000000000000",
	'createSymmetricReflexiveRelationship',
	'Creates a symmetric reflexive relationship on the specified object.

"4.2 Modeling Symmetric Reflexive Relationships
On the Information Model, show a symmetric relationship with a relationship 
line that loops back to the object. Since, by definition, such a relationship 
must have the same name, multiplicity, and conditionality at each end, name and 
characterize the relationship at one end only. To ensure that an instance of 
the relationship appears only once in the model, always formalize the 
relationship with an associative object regardless of the multiplicity of the 
relationship itself. In Figure 4.1 we show the Employee WORKS WITH Employee 
relationship so formalized." [OOA96]

Unlike The OOA96 Report, this metamodel only requires an associative object for 
relationship multiplicities that normally require an associative object. For 
symmetric reflexive, there is only the one multiplicity that doesn''t require an 
associative object.',
	'result = creationResult_t::SUCCESS;
select any domain from instances of MDOM where selected.name == param.domain;
if (empty domain)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
elif ("" == param.phrase)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"This metamodel requires a verb phrase on a unary relationship!" );
else
  select any associative from instances of SUB where selected.name == param.associativeObject;
  if (empty associative and (param.many or param.conditional))
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"This metamodel enforces use of associative objects for all M:M, M:c, c:M, and c:c relationships!" );
  else
    select any irl from instances of IRL where selected.number == param.number;
    if (not empty irl)
      result = creationResult_t::DUPLICATE;
      LOG::LogFailure( message:"Duplication of relationship number!" );
    else
      select any sub from instances of SUB where selected.name == param.object;
      if (empty sub)
        result = creationResult_t::FAILURE;
        LOG::LogFailure( message:"Object, " + param.object + ", not instantiated!" );
      else
        // Create relationship
        create object instance rel of REL;
        create object instance irl of IRL;
        relate sub to sub across R133.''is related to'' using irl; 
        relate irl to rel across R200;
        create object instance ncm of NCM;
        relate ncm to irl across R213;
        create object instance syr of SYR;
        relate syr to irl across R201;
        // Add perspective
        create object instance psp of PSP;
        create object instance syp of SYP;
        relate syp to psp across R204;
        relate syr to syp across R206;
        // Add multiplicity
        if (param.many)
          create object instance mnyp of MNYP;
          relate mnyp to psp across R210;
        else
          create object instance onep of ONEP;
          relate onep to psp across R210;
        end if;
        // Determine referential location
        idSub = sub;
        if (not empty associative)
          idSub = associative;
        end if;
        // Find identifiers and create referentials
        idSub.associateReferentials( relationship:irl.number );
        if (not empty associative)
          create object instance rel of REL;
          create object instance arl of ARL;
          relate arl to rel across R200;
          relate arl to irl across R212;
          relate idSub to arl across R202;
        end if;
      end if;
    end if;
  end if;
end if;

',
	"ba5eda7a-def5-0000-0000-000000000000",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("2d41f9bb-c746-4732-b79c-734ecb589a49",
	"a4860f18-8714-4b5a-b949-7dcab4de1735",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.
');
INSERT INTO S_SPARM
	VALUES ("ad07bce1-119a-40a4-a5cf-4944f63547f2",
	"a4860f18-8714-4b5a-b949-7dcab4de1735",
	'number',
	"ba5eda7a-def5-0000-0000-000000000002",
	0,
	'',
	"2d41f9bb-c746-4732-b79c-734ecb589a49",
	'The numeric identifier for the relationship.');
INSERT INTO S_SPARM
	VALUES ("cd7b8b9b-a1d1-4838-9d15-ae77400eb558",
	"a4860f18-8714-4b5a-b949-7dcab4de1735",
	'object',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"ad07bce1-119a-40a4-a5cf-4944f63547f2",
	'The passive object is the one at the end of the relationship with the passive 
verb phrase.');
INSERT INTO S_SPARM
	VALUES ("96d29cc8-fe3d-4dd8-a439-a80a8ba7d2ad",
	"a4860f18-8714-4b5a-b949-7dcab4de1735",
	'phrase',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"cd7b8b9b-a1d1-4838-9d15-ae77400eb558",
	'A passive verb phrase is one that has action taken on it. e.g., "is configured 
by"');
INSERT INTO S_SPARM
	VALUES ("e28e92f5-0d67-419f-b406-7c33271432b8",
	"a4860f18-8714-4b5a-b949-7dcab4de1735",
	'conditional',
	"ba5eda7a-def5-0000-0000-000000000001",
	0,
	'',
	"96d29cc8-fe3d-4dd8-a439-a80a8ba7d2ad",
	'A true value indicates that a conditional indicator is placed on the unary 
relationship.
    As this is the same as a 1c:1c or Mc:Mc binary, the associativeObject 
parameter must be valid.');
INSERT INTO S_SPARM
	VALUES ("ef23815e-e1a0-4153-ae05-274000aa7aba",
	"a4860f18-8714-4b5a-b949-7dcab4de1735",
	'many',
	"ba5eda7a-def5-0000-0000-000000000001",
	0,
	'',
	"e28e92f5-0d67-419f-b406-7c33271432b8",
	'A true value indicates that a many indicator is placed on the unary 
relationship.
    As this is the same as a M:M binary, the associativeObject parameter must 
be valid.');
INSERT INTO S_SPARM
	VALUES ("c3be17b8-b60a-47bc-9b19-aebba8f1da44",
	"a4860f18-8714-4b5a-b949-7dcab4de1735",
	'associativeObject',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"ef23815e-e1a0-4153-ae05-274000aa7aba",
	'The name of the associative object to abstract the unary relationship. If left 
blank, there is no associative object abstracting the relationship. 
    If many or conditional are true, this must name a valid object.');
INSERT INTO PE_PE
	VALUES ("a4860f18-8714-4b5a-b949-7dcab4de1735",
	1,
	"6af001f7-bb54-4ef1-9f8b-8c3db6765396",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_SYNC
	VALUES ("c8b753fd-a606-49b1-8f8a-750743b75d60",
	"00000000-0000-0000-0000-000000000000",
	'setCompositionConstraint',
	'Set an existing relationship to be constrained as a composition from it''s 
participation in a relationship loop, rather than by referential attributes.

"[When a relationship is the logical consequence of other relationships,] 
Such a relationship is said to be formed by composition (as in composition of 
functions in mathematics. [...] A relationship formed by composition cannot be 
formalized in referential attributes, since the connections between the 
instances is already given by the connections between the [composing 
relationships].
    A relationship formed by composition is annotated on the model as [composed 
relationship = 1st composing relationship + 2nd composing relationship [+ nth 
composing relationship ...]]." [OL:MWS]

"Composed Relationships. Another special case occurs when the constraint on the 
referential attribute is such that it identifies a single instance of the 
associated object. [...] Composition of relationships captures the constraint 
directly in data [...] However the use of composition is limited in that it 
requires that the constraint always identify a single associated instance." 
[OOA96]

Both definitions identify compositions as relationship combinations that loop 
back to the originating instance. [miUML] calls compositions, "Constrained 
Loops", because the compostion equation forms a constraint on the object 
instances allowed to participate.
    [OOA96] also discusses collapsed referentials, but the example shows them 
to be an alternative way to draw compositions on the object model. This 
metamodel will only model a composition and leave the way to display it up to 
the model editor.',
	'result = creationResult_t::SUCCESS;
select any domain from instances of MDOM where selected.name == param.domain;
if (empty domain)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
else
  select any irl from instances of IRL where selected.number == param.compositionSegmentNumber;
  if (empty irl)
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"Composition relationship, " + TC::intToString( i:param.compositionSegmentNumber ) + ", not instantiated!" );
  else
    number_of_participants = param.composingSegments.length;
    i = 0;
    while ( number_of_participants > i )
      select any pirl from instances of IRL where selected.number == param.composingSegments[i];
      if (empty pirl)
        result = creationResult_t::FAILURE;
        LOG::LogFailure( message:"Composition relationship, " + TC::intToString( i:param.composingSegments[i] ) + ", not instantiated!" );
      end if;
      i = i + 1;
    end while;
    if (result == creationResult_t::SUCCESS)
      select one ncm related by irl->NCM[R213];
      select many refs related by ncm->REF[R128];
      for each ref in refs
        unrelate ref from ncm across R128;
        delete object instance ref;
      end for;
      unrelate ncm from irl across R213;
    end if;
    create object instance com of COM;
    relate com to irl across R213;
    create object instance csl of CSL;
    relate csl to com across R214;
    i = 0;
    while ( number_of_participants > i )
      select any pirl from instances of IRL where selected.number == param.composingSegments[i];
      create object instance lseg of LSEG;
      relate pirl to csl across R215 using lseg;
    end while;
  end if;
end if;
return result;

',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("d28ec316-6a60-4dd4-924d-8d7308996e7e",
	"c8b753fd-a606-49b1-8f8a-750743b75d60",
	'compositionSegmentNumber',
	"ba5eda7a-def5-0000-0000-000000000002",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The numeric identifier for the relationship that is the loop segment that is 
the result of the composition equation. e.g., for a composition, "R3=R2+R1", R3 
is the composition segment, so 3 is the composition segment number.

');
INSERT INTO S_SPARM
	VALUES ("f9a0e2cd-b0d3-47cf-8040-56c6ea6020cb",
	"c8b753fd-a606-49b1-8f8a-750743b75d60",
	'composingSegments',
	"ba5eda7a-def5-0000-0000-000000000002",
	0,
	'[]',
	"d28ec316-6a60-4dd4-924d-8d7308996e7e",
	'An array containing the relationship numbers for all the relationships that 
participate in the relationship loop, but aren''t the composed relationship. 
e.g., in the composition, "R3=R2+R1", the array {2,1} (or {1,2} order doesn''t 
matter) would be passed in this parameter.');
INSERT INTO S_DIM
	VALUES (0,
	0,
	"00000000-0000-0000-0000-000000000000",
	"f9a0e2cd-b0d3-47cf-8040-56c6ea6020cb",
	"00000000-0000-0000-0000-000000000000",
	"00000000-0000-0000-0000-000000000000",
	"00000000-0000-0000-0000-000000000000",
	"00000000-0000-0000-0000-000000000000",
	"00000000-0000-0000-0000-000000000000",
	"00000000-0000-0000-0000-000000000000",
	"00000000-0000-0000-0000-000000000000",
	"00000000-0000-0000-0000-000000000000",
	"00000000-0000-0000-0000-000000000000",
	"00000000-0000-0000-0000-000000000000",
	"00000000-0000-0000-0000-000000000000",
	"00000000-0000-0000-0000-000000000000",
	"2528f9e4-56b7-4215-bef3-5f05414cbd6c",
	"00000000-0000-0000-0000-000000000000",
	"00000000-0000-0000-0000-000000000000",
	"00000000-0000-0000-0000-000000000000");
INSERT INTO S_SPARM
	VALUES ("ce89b957-729b-4fd8-b175-1dca7629001c",
	"c8b753fd-a606-49b1-8f8a-750743b75d60",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"f9a0e2cd-b0d3-47cf-8040-56c6ea6020cb",
	'The modeled domain name.');
INSERT INTO PE_PE
	VALUES ("c8b753fd-a606-49b1-8f8a-750743b75d60",
	1,
	"6af001f7-bb54-4ef1-9f8b-8c3db6765396",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_SYNC
	VALUES ("123160c6-3354-47b2-a429-91cc0a8b340f",
	"00000000-0000-0000-0000-000000000000",
	'addReturnTypeToBridge',
	'Add a return type to bridge created as an asynchronous bridge to make it a 
synchronous bridge.',
	'result = creationResult_t::SUCCESS;
select any mdom from instances of MDOM where selected.name == param.domain;
if (empty mdom)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
else
  select any asb from instances of ASB where selected.name == param.bridge_name;
  if (empty asb)
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"Bridge, " + param.bridge_name + ", not instantiated!" );
  else
    select any type from instances of TYPE where selected.name == param.type;
    if (empty type)
      result = creationResult_t::FAILURE;
      LOG::LogFailure( message:"Data type, " + param.type + ", not instantiated!" );
    else
      create object instance syb of SYB;
      select one brg related by asb->BRG[R3];
      unrelate asb from brg across R3;
      relate syb to brg across R3;
      select one asa related by asb->ASA[R506];
      unrelate asb from asa across R506;
      delete object instance asb;
      select one acc related by asa->ACC[R505];
      unrelate asa from acc across R505;
      delete object instance asa;
      create object instance sya of SYA;
      relate sya to acc across R505;
      relate sya to syb across R524;
      create object instance val of VAL;
      create object instance dus of DUS;
      relate dus to type across R625;
      create object instance re of RE;
      relate dus to re across R514;
      relate val to dus across R624;
      create object instance rvl of RVL;
      relate rvl to val across R629;
      relate sya to type across R529 using rvl;
    end if;
  end if;
end if;
return result;
',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("6d310763-a7ff-413f-8f98-0b00a9f19fd9",
	"123160c6-3354-47b2-a429-91cc0a8b340f",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.
');
INSERT INTO S_SPARM
	VALUES ("2a3b8f17-d51a-434b-bf9b-7e709448d5be",
	"123160c6-3354-47b2-a429-91cc0a8b340f",
	'bridge_name',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"6d310763-a7ff-413f-8f98-0b00a9f19fd9",
	'The name of the bridge.');
INSERT INTO S_SPARM
	VALUES ("15efa11b-e2d6-4061-83a8-fcacf25807b4",
	"123160c6-3354-47b2-a429-91cc0a8b340f",
	'type',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"2a3b8f17-d51a-434b-bf9b-7e709448d5be",
	'The data type to be returned by the bridge.');
INSERT INTO PE_PE
	VALUES ("123160c6-3354-47b2-a429-91cc0a8b340f",
	1,
	"6af001f7-bb54-4ef1-9f8b-8c3db6765396",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_SYNC
	VALUES ("a0163a48-2029-46e5-8066-bda4c73c2b13",
	"00000000-0000-0000-0000-000000000000",
	'createDomain',
	'Create a domain for the purposes of model verification. This creation will 
always result in a failure, due to the constraint that a domain model must 
contain at least one object. A log entry will be created for any failure.
    A duplication failure will be reported with higher precedence.',
	'result = creationResult_t::FAILURE;
select any dom from instances of DOM where selected.name == param.name;
if (empty dom)
    if ("" == param.name)
        LOG::LogFailure( message:"Create domain failed due to invalid name." );
    else
        create object instance dom of DOM;
        create object instance mdom of MDOM;
        relate dom to mdom across R1;
        // Instantiate core types, or domain type creation will fail.
        ::createCoreTypes();
        LOG::LogInfo( message:"Modeled domain created without any objects." );
    end if;
else
    result = creationResult_t::DUPLICATE;
    LOG::LogFailure(message:"A domain named, " + param.name + ", already exists!");
end if;
return result;',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("70f0d1c0-8c81-4133-870b-75a3955c56b6",
	"a0163a48-2029-46e5-8066-bda4c73c2b13",
	'name',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.
');
INSERT INTO PE_PE
	VALUES ("a0163a48-2029-46e5-8066-bda4c73c2b13",
	1,
	"6af001f7-bb54-4ef1-9f8b-8c3db6765396",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_SYNC
	VALUES ("f786177d-0ab3-4d31-a482-557bf967856d",
	"00000000-0000-0000-0000-000000000000",
	'createProvidedBridge',
	'Create an incoming bridge to the modeled domain.
    The bridge is created as an asynchronous bridge, which can be changed to 
synchronous by adding a return type via another provided bridge of this 
metamodel.',
	'result = creationResult_t::SUCCESS;
if ("" == param.name)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Create bridge failed due to invalid name, " + param.name + "." );
else
  select any mdom from instances of MDOM where selected.name == param.domain;
  if (empty mdom)
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
  else
    select any acc from instances of ACC where selected.name == param.name;
    if (not empty acc)
      select one syb related by acc->SYA[R505]->SYB[R524];
      select one asb related by acc->ASA[R505]->ASB[R506];
      if (not empty syb or not empty asb)
        result = creationResult_t::DUPLICATE;
        LOG::LogFailure( message:"Bridge, " + param.name + ", already instantiated!" );
      end if;
    end if;
    if ( creationResult_t::SUCCESS == result )
      create object instance brg of BRG;
      create object instance inbr of INBR;
      relate inbr to brg across R4;
      relate inbr to mdom across R6;
      create object instance asb of ASB;
      relate asb to brg across R3;
      create object instance acc of ACC;
      acc.name = param.name;
      create object instance asa of ASA;
      relate asa to acc across R505;
      relate asa to asb across R506;
    end if;
  end if;
end if;
return result;
',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("9898bfd6-c9ab-4dfd-b4f1-de0a127bfb0e",
	"f786177d-0ab3-4d31-a482-557bf967856d",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.
');
INSERT INTO S_SPARM
	VALUES ("01a4b47f-5b0e-414d-86f6-1a59d7e5b4d6",
	"f786177d-0ab3-4d31-a482-557bf967856d",
	'name',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"9898bfd6-c9ab-4dfd-b4f1-de0a127bfb0e",
	'The name of the bridge.');
INSERT INTO PE_PE
	VALUES ("f786177d-0ab3-4d31-a482-557bf967856d",
	1,
	"6af001f7-bb54-4ef1-9f8b-8c3db6765396",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_SYNC
	VALUES ("c3315f04-9859-4932-99db-d7bce3dbe439",
	"00000000-0000-0000-0000-000000000000",
	'createRequiredBridge',
	'Create an outgoing bridge between the modeled domain and an external domain.
    The bridge is created as an asynchronous bridge, which can be changed to 
synchronous by adding a return type via another provided bridge of this 
metamodel.',
	'result = creationResult_t::SUCCESS;
if ("" == param.name)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Create bridge failed due to invalid object name, " + param.name + "." );
else
  select any mdom from instances of MDOM where selected.name == param.domain;
  if (empty mdom)
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
  else
    select any acc from instances of ACC where selected.name == param.name;
    if (not empty acc)
      select one syb related by acc->SYA[R505]->SYB[R524];
      select one asb related by acc->ASA[R505]->ASB[R506];
      if (not empty syb or not empty asb)
        result = creationResult_t::DUPLICATE;
        LOG::LogFailure( message:"Bridge, " + param.name + ", already instantiated!" );
      end if;
    end if;
    if ( creationResult_t::SUCCESS == result )
      select any edom from instances of EDOM where selected.name == param.externalDomain;
      if (empty edom)
        create object instance edom of EDOM;
      end if;
      create object instance brg of BRG;
      create object instance oubr of OUBR;
      relate oubr to brg across R4;
      relate mdom to edom across R5 using oubr;
      create object instance asb of ASB;
      relate asb to brg across R3;
      create object instance acc of ACC;
      acc.name = param.name;
      create object instance asa of ASA;
      relate asa to acc across R505;
      relate asa to asb across R506;
    end if;
  end if;
end if;
return result;
',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("5dcbe219-8577-4816-9471-300855a4acb6",
	"c3315f04-9859-4932-99db-d7bce3dbe439",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.
');
INSERT INTO S_SPARM
	VALUES ("cc772686-6828-483e-a568-6f28083ae23e",
	"c3315f04-9859-4932-99db-d7bce3dbe439",
	'name',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"f274c3d5-03d5-4cb2-99b3-705ae12dffbb",
	'The name of the bridge.');
INSERT INTO S_SPARM
	VALUES ("f274c3d5-03d5-4cb2-99b3-705ae12dffbb",
	"c3315f04-9859-4932-99db-d7bce3dbe439",
	'externalDomain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"5dcbe219-8577-4816-9471-300855a4acb6",
	'');
INSERT INTO PE_PE
	VALUES ("c3315f04-9859-4932-99db-d7bce3dbe439",
	1,
	"6af001f7-bb54-4ef1-9f8b-8c3db6765396",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_SYNC
	VALUES ("39d6f409-5edf-4dcd-b3f8-1feebb3e4c55",
	"00000000-0000-0000-0000-000000000000",
	'addReturnTypeToMethod',
	'',
	'result = creationResult_t::SUCCESS;
select any mdom from instances of MDOM where selected.name == param.domain;
if (empty mdom)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
else
  select any sub from instances of SUB where selected.name == param.object;
  if (empty sub)
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"Object, " + param.object + ", not instantiated!" );
  else
    select any mth from instances of MTH where (selected.name == param.method) and selected.belongsTo( object:param.object );
    if (empty mth)
      result = creationResult_t::FAILURE;
      LOG::LogFailure( message:"Method, " + param.method + ", not instantiated!" );
    else
      select any type from instances of TYPE where selected.name == param.type;
      if (empty type)
        result = creationResult_t::FAILURE;
        LOG::LogFailure( message:"Data type, " + param.type + ", not instantiated!" );
      else
        select one sya related by mth->ISY[R534]->SYA[R524];
        create object instance rvl of RVL;
        create object instance val of VAL;
        relate rvl to val across R629;
        create object instance dus of DUS;
        relate val to dus across R624;
        relate dus to type across R625;
        relate sya to type across R529 using rvl;
      end if;
    end if;
  end if;
end if;
return result;

',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("ffc13239-97c4-46ee-99f3-a7538c347d0c",
	"39d6f409-5edf-4dcd-b3f8-1feebb3e4c55",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.
');
INSERT INTO S_SPARM
	VALUES ("4d4a806e-e0c7-416b-98fc-0863b5d60484",
	"39d6f409-5edf-4dcd-b3f8-1feebb3e4c55",
	'object',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"ffc13239-97c4-46ee-99f3-a7538c347d0c",
	'The name of the object.');
INSERT INTO S_SPARM
	VALUES ("729cbacf-d6f0-46ce-b1ee-1751047725f3",
	"39d6f409-5edf-4dcd-b3f8-1feebb3e4c55",
	'method',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"4d4a806e-e0c7-416b-98fc-0863b5d60484",
	'The name of the method.
');
INSERT INTO S_SPARM
	VALUES ("99658216-5129-4e7b-849b-ec482426072d",
	"39d6f409-5edf-4dcd-b3f8-1feebb3e4c55",
	'type',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"729cbacf-d6f0-46ce-b1ee-1751047725f3",
	'The data type to be returned by the bridge.');
INSERT INTO PE_PE
	VALUES ("39d6f409-5edf-4dcd-b3f8-1feebb3e4c55",
	1,
	"6af001f7-bb54-4ef1-9f8b-8c3db6765396",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_SYNC
	VALUES ("4d60ec9c-1c13-45ed-ac88-a855808171a0",
	"00000000-0000-0000-0000-000000000000",
	'addReturnTypeToAttributeAction',
	'',
	'result = creationResult_t::SUCCESS;
select any mdom from instances of MDOM where selected.name == param.domain;
if (empty mdom)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
else
  select any sub from instances of SUB where selected.name == param.object;
  if (empty sub)
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"Object, " + param.object + ", not instantiated!" );
  else
    select any atr from instances of ATR where (selected.name == param.attribute) and selected.belongsTo( object:param.object );
    if (empty atr)
      result = creationResult_t::FAILURE;
      LOG::LogFailure( message:"Attribute, " + param.attribute + ", not instantiated!" );
    else
      select any type from instances of TYPE where selected.name == param.type;
      if (empty type)
        result = creationResult_t::FAILURE;
        LOG::LogFailure( message:"Data type, " + param.type + ", not instantiated!" );
      else
        select one sya related by atr->NRA[R103]->ATA[R523]->ISY[R534]->SYA[R524];
        create object instance rvl of RVL;
        create object instance val of VAL;
        relate rvl to val across R629;
        create object instance dus of DUS;
        relate val to dus across R624;
        relate dus to type across R625;
        relate sya to type across R529 using rvl;
      end if;
    end if;
  end if;
end if;
return result;

',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("c4d55224-f3e5-43eb-9544-b53562c64fd8",
	"4d60ec9c-1c13-45ed-ac88-a855808171a0",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.
');
INSERT INTO S_SPARM
	VALUES ("73246779-aad8-4b8a-88e7-88faeee85dd1",
	"4d60ec9c-1c13-45ed-ac88-a855808171a0",
	'object',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"c4d55224-f3e5-43eb-9544-b53562c64fd8",
	'The name of the object.');
INSERT INTO S_SPARM
	VALUES ("c900b9d0-44fb-4067-aa49-1e662a0a805f",
	"4d60ec9c-1c13-45ed-ac88-a855808171a0",
	'attribute',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"73246779-aad8-4b8a-88e7-88faeee85dd1",
	'The name of the attribute.');
INSERT INTO S_SPARM
	VALUES ("cd9fccaf-50ea-4bc6-87db-1e4ee98527f5",
	"4d60ec9c-1c13-45ed-ac88-a855808171a0",
	'type',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"c900b9d0-44fb-4067-aa49-1e662a0a805f",
	'The data type to be returned by the bridge.');
INSERT INTO PE_PE
	VALUES ("4d60ec9c-1c13-45ed-ac88-a855808171a0",
	1,
	"6af001f7-bb54-4ef1-9f8b-8c3db6765396",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_SYNC
	VALUES ("e45bcbb0-d83a-494a-9bd1-83fd46a38aaf",
	"00000000-0000-0000-0000-000000000000",
	'addParameterToBridge',
	'Adds parameter of specified type to the named bridge.',
	'result = creationResult_t::SUCCESS;
select any domain from instances of MDOM where selected.name == param.domain;
if (empty domain)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
else
  select any acc from instances of ACC where selected.name == param.bridge_name;
  if (empty acc)
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"Accessor, " + param.bridge_name + ", not instantiated!" );
  else
    select one brg related by acc->SYA[R505]->SYB[R524]->BRG[R3];
    if (empty brg)
      select one brg related by acc->ASA[R505]->ASB[R506]->BRG[R3];
      if (empty brg)
        result = creationResult_t::FAILURE;
        LOG::LogFailure( message:"Bridge, " + param.bridge_name + ", not instantiated!" );
      end if;
    end if;
    if (not empty brg)
      select any prm related by acc->PRM[R540] where selected.name == param.name;
      if (not empty prm)
        result = creationResult_t::DUPLICATE;
        LOG::LogFailure( message:"Parameter data," + param.name + ", already added to accessor!" );
      else
        select any type from instances of TYPE where selected.name == param.type;
        if (not empty type)
          result = creationResult_t::FAILURE;
          LOG::LogFailure( message:"Type, " + param.type + ", not instantiated!" );
        else
          create object instance prm of PRM;
          relate prm to acc across R540;
          create object instance nep of NEP;
          relate nep to prm across R542;
        end if;
      end if;
    end if;
  end if;
end if;
return result;

',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("eb319e0d-27a9-4eae-9561-83946f924d14",
	"e45bcbb0-d83a-494a-9bd1-83fd46a38aaf",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.
');
INSERT INTO S_SPARM
	VALUES ("d22475d2-e99c-4d73-aa42-aafa92305e0b",
	"e45bcbb0-d83a-494a-9bd1-83fd46a38aaf",
	'name',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"b0b5757a-8373-4939-ad44-7b0d759680c1",
	'The name of the data parameter.');
INSERT INTO S_SPARM
	VALUES ("b0b5757a-8373-4939-ad44-7b0d759680c1",
	"e45bcbb0-d83a-494a-9bd1-83fd46a38aaf",
	'bridge_name',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"eb319e0d-27a9-4eae-9561-83946f924d14",
	'The name of the bridge.');
INSERT INTO S_SPARM
	VALUES ("f1086250-6a99-4edc-b572-04629dc02795",
	"e45bcbb0-d83a-494a-9bd1-83fd46a38aaf",
	'type',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"d22475d2-e99c-4d73-aa42-aafa92305e0b",
	'The identifier for the type that defines the data parameter.');
INSERT INTO PE_PE
	VALUES ("e45bcbb0-d83a-494a-9bd1-83fd46a38aaf",
	1,
	"6af001f7-bb54-4ef1-9f8b-8c3db6765396",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO S_SYNC
	VALUES ("0f2aba2f-8632-4923-87df-5e5ba23445e3",
	"00000000-0000-0000-0000-000000000000",
	'addParameterToMethod',
	'Adds a parameter of the specified type to the named method.',
	'result = creationResult_t::SUCCESS;
select any domain from instances of MDOM where selected.name == param.domain;
if (empty domain)
  result = creationResult_t::FAILURE;
  LOG::LogFailure( message:"Domain, " + param.domain + ", not instantiated!" );
else
  select any sub from instances of SUB where (selected.name == param.object);
  if (empty sub)
    result = creationResult_t::FAILURE;
    LOG::LogFailure( message:"Object, " + param.object + ", not instantiated in domain!" );
  else
    select any mth from instances of MTH where (selected.name == param.method) and selected.belongsTo( object:sub.name );
    if (empty mth)
      result = creationResult_t::FAILURE;
      LOG::LogFailure( message:"Method, " + param.method + ", of object, " + param.object + ", not instantiated!" );
    else
      select one acc related by mth->ISY[R534]->SYA[R524]->ACC[R505];
      select any prm related by acc->PRM[R540] where selected.name == param.name;
      if (not empty prm)
        result = creationResult_t::DUPLICATE;
        LOG::LogFailure( message:"Parameter data," + param.name + ", already added to accessor!" );
      else
        select any type from instances of TYPE where selected.name == param.type;
        if (not empty type)
          result = creationResult_t::FAILURE;
          LOG::LogFailure( message:"Type, " + param.type + ", not instantiated!" );
        else
          create object instance prm of PRM;
          relate prm to acc across R540;
          create object instance nep of NEP;
          relate nep to prm across R542;
        end if;
      end if;
    end if;
  end if;
end if;
return result;',
	"709da393-5976-4a6f-9ea6-b5c91ab9f7a4",
	1,
	'',
	0);
INSERT INTO S_SPARM
	VALUES ("f3b083cc-c7a1-45e0-96d0-0da40174861f",
	"0f2aba2f-8632-4923-87df-5e5ba23445e3",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The modeled domain name.
');
INSERT INTO S_SPARM
	VALUES ("5136fdb4-b741-416a-bbad-11ebd4ab23fb",
	"0f2aba2f-8632-4923-87df-5e5ba23445e3",
	'object',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"f3b083cc-c7a1-45e0-96d0-0da40174861f",
	'The name of the object by which the event is accessed.');
INSERT INTO S_SPARM
	VALUES ("ef2f9982-afb4-4ab4-9ddd-67825fbba69c",
	"0f2aba2f-8632-4923-87df-5e5ba23445e3",
	'method',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"5136fdb4-b741-416a-bbad-11ebd4ab23fb",
	'The name of the method.');
INSERT INTO S_SPARM
	VALUES ("ed9ea07d-4a02-4b1c-ad8e-63036820f14e",
	"0f2aba2f-8632-4923-87df-5e5ba23445e3",
	'name',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"ef2f9982-afb4-4ab4-9ddd-67825fbba69c",
	'The name of the data parameter.');
INSERT INTO S_SPARM
	VALUES ("177ddcd9-f5cf-4600-ab8f-473ee038dfd6",
	"0f2aba2f-8632-4923-87df-5e5ba23445e3",
	'type',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"ed9ea07d-4a02-4b1c-ad8e-63036820f14e",
	'The identifier for the type that defines the data parameter.');
INSERT INTO PE_PE
	VALUES ("0f2aba2f-8632-4923-87df-5e5ba23445e3",
	1,
	"6af001f7-bb54-4ef1-9f8b-8c3db6765396",
	"00000000-0000-0000-0000-000000000000",
	1);
INSERT INTO PE_PE
	VALUES ("6af001f7-bb54-4ef1-9f8b-8c3db6765396",
	1,
	"9ddf81e7-a28d-4e3c-b59b-ce104ef0f540",
	"00000000-0000-0000-0000-000000000000",
	7);
INSERT INTO EP_PKG_PROXY
	VALUES ("9ddf81e7-a28d-4e3c-b59b-ce104ef0f540",
	"00000000-0000-0000-0000-000000000000",
	"c8b88000-dddc-4206-8410-2f69b8f86b67",
	'Incoming Bridges',
	'Bridges into the metamodel domain.',
	0,
	'../Incoming Bridges.xtuml');
INSERT INTO S_SYS_PROXY
	VALUES ("c8b88000-dddc-4206-8410-2f69b8f86b67",
	'shlaer-mellor-metamodel',
	1,
	'../../../../shlaer-mellor-metamodel.xtuml');
